<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>multi-column 多栏布局实现瀑布流</title>
</head>

<body>


  <div class="masonry">
    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/1.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>
    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/2.jpg" />
      <span class="title">的点点滴滴大无无无无无无无无无无无无哇AW</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/3.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/4.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/5.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/1.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>
    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/2.jpg" />
      <span class="title">的点点滴滴大无无无无无无无无无无无无哇AW</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/3.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/4.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>

    <div class="item">
      <img src="https://sofile.cn/wp-content/uploads/img_test/5.jpg" />
      <span class="title">简简单单的介绍</span>
    </div>
    <!-- more items-->
  </div>

  <style>
    .masonry {
      column-count: 3;
      column-gap: 10px;
    }

    .masonry .item {
      border: 1px solid #999;
      margin-bottom: 10px;
      break-inside: avoid;
    }

    .masonry .item img {
      width: 100%;
    }
  </style>

</body>

</html>